<?php
require_once(dirname(__FILE__).'/include/config.inc.php');

//初始化参数检测正确性
$cid = empty($cid) ? 5 : intval($cid);
$id  = empty($id)  ? 0 : intval($id);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo GetHeader(1,$cid,$id); ?>
<link href="templates/default/style/webstyle.css" type="text/css" rel="stylesheet" />
<link href="templates/default/style/lightbox.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]><link href="templates/default/style/lightbox.ie6.css" rel="stylesheet" type="text/css"/><![endif]-->
<script type="text/javascript" src="templates/default/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/default/js/loadimage.js"></script>
<script type="text/javascript" src="templates/default/js/slidespro.js"></script>
<script type="text/javascript" src="templates/default/js/lightbox.js"></script>
<script type="text/javascript" src="templates/default/js/comment.js"></script>
<script type="text/javascript" src="templates/default/js/top.js"></script>
<script type="text/javascript">
$(function(){
	jQuery('.lightbox').lightbox();
    $(".showimg img").LoadImage({width:750,height:600});
	$(".picarr .picture img").LoadImage({width:530,height:350});
	$(".picarr .preview img").LoadImage({width:58,height:45});
	$(".small").click(function(){$("#textarea").css('font-size','12px');});
	$(".big").click(function(){$("#textarea").css('font-size','14px');});
});
</script>
</head>
<body>
<!-- header-->
<?php require_once('header.php'); ?>
<!-- /header-->
<!-- banner-->
<div class="subBanner"> <img src="templates/default/images/banner-ir.png" /> </div>
<!-- /banner-->
<!-- notice-->
<div class="subnotice"><strong>网站公告：</strong> <?php echo Info(1); ?> </div>
<!-- /notice-->
<!-- mainbody-->
<div class="subBody">
	<div class="subTitle"> <span class="catname"><?php echo GetCatName($cid); ?></span> <a href="javascript:history.go(-1);" class="goback">&gt;&gt; 返回</a> <span class="fr">您当前所在位置：<?php echo GetPosStr($cid,$id); ?></span>
		<div class="cl"></div>
	</div>
	<div class="OneOfTwo">
		<!-- 详细区域开始 -->
		<div class="listConts">
			<?php

			//检测文档正确性
			$r = $dosql->GetOne("SELECT * FROM `#@__infolist` WHERE id=$id");
			if(@$r)
			{
			//增加一次点击量
			$dosql->ExecNoneQuery("UPDATE `#@__infolist` SET hits=hits+1 WHERE id=$id");
			$row = $dosql->GetOne("SELECT * FROM `#@__infolist` WHERE id=$id");
			?>
			<!-- 标题区域开始 -->
			<h1 class="title"><?php echo $row['title']; ?></h1>
			<div class="info"><small>点击次数：</small><?php echo $row['hits']; ?>次</div>
			<!-- 标题区域结束 -->

			<!-- 内容区域开始 -->
			<div class="conttitle">相关介绍</div>
			<div id="textarea">
				<?php
				if($row['content'] != '')
					echo GetContPage($row['content']);
				else
					echo '网站资料更新中...';
				?>
			</div>
			<!-- 内容区域结束 -->
			<?php
			}
			?>
		</div>
		<!-- 详细区域结束 -->
	</div>
	<div class="cl"></div>
	
	
	<div style="width:533px;height:300px; border:1px solid #ccc;">推荐餐饮 <a href="product.php?cid=<?php echo $_GET['cid'] ?>&id=<?php echo $_GET['id'] ?>&xingji=canyin"">MORE</a>

		<div>
		
			<?php 
				$row = $dosql->GetOne("SELECT * FROM `#@__infoclass` WHERE id=29 ");
				$rs = $dosql->GetOne("SELECT * FROM `#@__infolist` WHERE classid=".$row['id'] );
				
				if(isset($row['id']))
				{
					//获取链接地址
					if($row['linkurl']=='' and $cfg_isreurl!='Y')
						$gourl = 'productshow.php?cid='.$row['id'].'&id='.$rs['id'];
					else if($cfg_isreurl=='Y')
						$gourl = 'productshow-'.$row['id'].'-'.$rs['id'].'-1.html';
					else
						$gourl = $row['linkurl'];
				if($rs['title']!='')
					$title=$rs['title'];
					//获取缩略图地址
					if($row['picurl']!='')
						$picurl = $row['picurl'];
					else
						$picurl = 'templates/default/images/nofoundpic.gif';
					
				?>
				<div><a href="<?php echo $gourl; ?>"><img src="<?php echo $picurl; ?>" style="width:100px;height:100px;"/></a></div>
				<div><a href="<?php echo $gourl; ?>"><?php echo $title ?></div>
				<?php
				}
				else
				{
					echo '网站资料更新中...';
				}
				?>
			</div>
	</div>
	<div  style="width:533px;height:300px; border:1px solid #ccc;">推荐住宿 <a href="product.php?cid=<?php echo $_GET['cid'] ?>&id=<?php echo $_GET['id'] ?>&xingji=zhusu">MORE</a>
	<div>
		
			<?php 
				$row = $dosql->GetOne("SELECT * FROM `#@__infoclass` WHERE id=30 ");
				$rs = $dosql->GetOne("SELECT * FROM `#@__infolist` WHERE classid=".$row['id'] );
				
				if(isset($row['id']))
				{
					//获取链接地址
					if($row['linkurl']=='' and $cfg_isreurl!='Y')
						$gourl = 'productshow.php?cid='.$row['id'].'&id='.$rs['id'];
					else if($cfg_isreurl=='Y')
						$gourl = 'productshow-'.$row['id'].'-'.$rs['id'].'-1.html';
					else
						$gourl = $row['linkurl'];
				if($rs['title']!='')
					$title=$rs['title'];
					//获取缩略图地址
					if($row['picurl']!='')
						$picurl = $row['picurl'];
					else
						$picurl = 'templates/default/images/nofoundpic.gif';
					
				?>
				<div><a href="<?php echo $gourl; ?>"><img src="<?php echo $picurl; ?>" style="width:100px;height:100px;"/></a></div>
				<div><a href="<?php echo $gourl; ?>"><?php echo $title ?></div>
				<?php
				}
				else
				{
					echo '网站资料更新中...';
				}
				?>
			</div>
	
	
	</div>
</div>
<!-- /mainbody-->
<!-- footer-->
<?php require_once('footer.php'); ?>
<!-- /footer-->
</body>
</html>